package com.live.stock.activity;

import java.net.URI;

import com.live.stock.handler.StockLiveHandler;

import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.text.Html;
import android.widget.ImageView;
import android.widget.TextView;

public class StockLiveActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        StockLiveHandler handler = new StockLiveHandler();
        handler.processFeed();
        System.out.println(">>>>>>>>>>>>>>>>>>>>" + handler.getDescription());
      //  System.out.println("Image>>>>>>>>>>>>>>>>>>>>" + handler.getImage());
        System.out.println("Title>>>>>>>>>>>>>>>>>>>>" + handler.getTitle());
        TextView title = (TextView)findViewById(R.id.title);
        title.setText(handler.getTitle());
        TextView description = (TextView)findViewById(R.id.description);
        description.setText(Html.fromHtml(handler.getDescription().toString()));
        
       /* ImageView descriptionImage = (ImageView)findViewById(R.id.descriptionImage);
        Uri uri = Uri.parse(handler.getDescription().toString());
        descriptionImage.setImageURI(uri);*/
    }
}